import tkinter as tk
from add_page import open as add_page
from delete_page import open as delete_page
from check_page import open as check_page
from set_page import open as set_page
def open(s):
    window = tk.Tk()
    window.title("养护人员-"+s)
    window.geometry("400x300")

    label = tk.Label(window, text="----养护任务操作菜单----")
    label.pack()
    add_button = tk.Button(window, text="增加养护任务", command=lambda: add_page(s),width=20,height=2)
    add_button.pack()

    delete_button = tk.Button(window, text="删除养护任务", command=lambda: delete_page(s), width=20, height=2)
    delete_button.pack()

    set_button = tk.Button(window, text="修改养护任务", command=lambda: set_page(s), width=20, height=2)
    set_button.pack()

    check_button = tk.Button(window, text="查询养护任务", command=lambda: check_page(s), width=20, height=2)
    check_button.pack()

    return_button = tk.Button(window, text="返回", command=window.destroy, width=20, height=2)
    return_button.pack()

    window.mainloop()
   # pass